﻿<?xml version="1.0" encoding="utf-8"?>
<CodeSnippet Format="1.0.0" xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  <Header>
    <Title>ArithExecuteClr</Title>
    <Author>jinlei</Author>
    <Shortcut>ArithExecuteClr</Shortcut>
    <Description>ArithExecuteClr</Description>
    <SnippetTypes>
      <SnippetType>SurroundsWith</SnippetType>
      <SnippetType>Expansion</SnippetType>
    </SnippetTypes>
  </Header>
  <Snippet>
    <Declarations>
      <Literal>
        <ID>ArithExecuteClr</ID>
        <Default>ArithExecuteClr</Default>
      </Literal>
    </Declarations>
    <Code Language="XML">
      <![CDATA[bool br = true;
	CMtTimeCounter mvTimeCounter;
	if (m_srcImage == nullptr || !m_srcImage->CheckImageIsValid() || m_dstImage == nullptr || !m_dstImage->CheckImageIsValid())
	{
		br = false;
		m_errCode = 10005;
	}
	else
	{
		XXXX->SetSrcImage(0, m_srcImage->GetMvImage());
		if (!m_srcRectF.IsEmpty)
			XXXX->SetSrcRgn(CMvRect(m_srcRectF.Left, m_srcRectF.Top, m_srcRectF.Right, m_srcRectF.Bottom));
		br = XXXX->Execute();
		m_errCode = XXXX->GetErrCode();
	}
	m_timeSpan = mvTimeCounter.Stop();
	return br;]]>
    </Code>
  </Snippet>
</CodeSnippet>